import com.demo.List.ArrayList.MyArrayList;
import com.demo.List.ArrayList.pokerCard.CardDemo;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @Author :蕉绿
 * @Date : 2023/2/1 12:03
 * @Version : V1.0
 * @Description :
 */
public class App {




    public static void main2(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        list.add(5);
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
        System.out.println("========================");
        for (int e:list
             ) {
            System.out.println(e);
        }
        System.out.println("===================");
        Iterator<Integer> it = list.iterator();
        while(it.hasNext()) {
            System.out.println(it.next() + " ");
        }
    }
    public static void main1(String[] args) {

//        Fibonacci fibonacci = new Fibonacci();
//        System.out.println(fibonacci.fib(1));
//        System.out.println(fibonacci.fib(100));
//        System.out.println(fibonacci.fib(3));
//        System.out.println(fibonacci.fib(0));
//        String s = "76";
//        int a = Integer.parseInt(s);
//        String str = String.valueOf(a);
//        ArrayList<Integer> arrayList = new ArrayList<>();
//        arrayList.add(2);

        MyArrayList arrayList = new MyArrayList();
        arrayList.add(1);
        arrayList.add(2);
        arrayList.add(3);
        arrayList.add(4);
        arrayList.add(5);
        arrayList.add(6);
        arrayList.display();
        System.out.println("============================");
//        System.out.println(arrayList.contains(4));
//        System.out.println(arrayList.contains(41));
//        System.out.println(arrayList.get(3));
//        System.out.println(arrayList.indexOf(4));
//        System.out.println(arrayList.get(8));
//        arrayList.add(3,44);
//        arrayList.display();
//        arrayList.set(1,55);
//        arrayList.display();
//        arrayList.remove(33);
//        arrayList.display();
        for (int i = 0; i < arrayList.size(); i++) {
            System.out.println(arrayList.get(i));
        }
//        for (int e:arrayList) {
//
//            System.out.println(e);
//        }


    }
}
